Getting Started
*******************


1- Running all the demos:
Run all the executables samples. There are about 60 samples.
You can find the executables in:
a)	SDK Samples\Samples\Api_Samples\Exec 
b)	SDK Samples\Samples\Console_Samples\Exec
c)	SDK Samples\Samples\Mfc_Samples\Exec
d)	SDK Samples\New Samples\Exec
e)	Community Samples\Exec
f)	Book\Samples\Exec

This would give you an idea of the things you can do. 
To use hardware acceleration press on Ctrl + Alt + V while the program is running.

2- View the source code:
You can find the source files in:
a)	SDK Samples\Samples\Api_Samples\Src 
b)	SDK Samples\Samples\Console_Samples\Src
c)	SDK Samples\Samples\Mfc_Samples\Src
d)	SDK Samples\New Samples\Src
e)	Community Samples\Src
f)	Book\Samples\Src

Start with the console samples they are the easiest to understand,
Some of the samples are less than one page of code!
Note that the LoadWorld sample is our Hello world so it's a good place to start.
Note also that the LandRover sample has 7 steps that take you from half page of code to a car racing demo (about 8 pages of code). If you are working with MFC you will find the "Running" sample useful. Inside RunningDlg.cpp are the steps needed to build an MFC project with 3D graphics.

*** Don't miss the new samples in New Samples directory.


3- Writing your own samples:
a- Add morfit.lib to your project (just do add files to project)
b- Include  mrft_api.h. example: #include "Include\\mrft_api.h"
c- Copy Morfit.dll to your application working directory. (You can also put it in your windows\system directory.)

This is all it takes to make your application 3D enabled!


4- Creating a stand alone application:
In order to run your application on any computer(with Windows 95/98/NT)
you will need Morfit.dll and fmod.dll in your application's working directory or in the Windows\System directory
fmod.dll could be omitted if the Morfit_sound API is not used
Note that if you intend to use the sound API within a commercial application
you must purchase a license from Morfit. If in doubt email us to support@morfit.com



Note that if your application is not running in Editor Mode you will also need the bsp files.
These files are created automatically after a world is loaded for the first time.
For example, after loading the file "my_world.wld" a file with the name my_world.bsp will be created in the same directory.
If these file are not included, loading time could be much longer.

Note that morfit.lib or mrft_api.h or any other file is not needed.



Understanding the basic principle of the graphic engine:

With one command you load a three dimensional world model
into the engine.
With one command you create a camera for taking pictures from inside 
the world. 
Now all you have to do is call this function
Morfit_engine_render(HWND hwnd, DWORD camera)
and voila !!! you have the picture taken using the camera
pasted on the given window !!!!
Now, if you modify the camera location or direction
and call the rendering function again, you get movement !!!

pseudo code:

	Morfit_engine_load_world("my_world.wld");
for(;;) {
		Morfit_camera_move(camera_to_take_the_picture);
		Morfit_engine_render(window_to_put_picture_on, camera_to_take_the_picture);
	}

Of course under window environment we don't take over the CPU like that... 
Instead we can use the OnIdle event or a timer.


		
Naming convention.
1- All the functions of this API start with Morfit_
Example: Morfit_camera_create(char *camera_name);

2- the second word is the name of the group of function.
Examples:
	Morfit_camera_set_location(x,y,x);
	Morfit_engine_increase_atmospheric_effect();


There are several groups off API commands
1- the engine API
	All function starting with Morfit_engine_
	controls things like picture quality, atmospheric effect etc ...

2- the camera API
	All function starting with Morfit_camera_
	controls properties of the camera like
	zoom location direction etc...

3- The object API
	All function starting with Morfit_object_
	In your world you can define objects like an airplane,
	a boy, a runner, a bird etc ...
	this api allows you to control their behavior.
	This API is used in 'viewer_mode' to manipulate moving objects.
	
4. The group API
	All function starting with Morfit_group_
	This API is used in editor mode to manipulate groups

The Other APIs are:
The Polygon API, the Point API,
the Track API, the Bitmap API, the Math API, the Utilities API,
the Animation API, the profiler API, the background API,the 3D Card API.


For more information please read the first two pages of Getting Started (In Morfit's Help).

